package com.app.oral.model

import java.time.LocalDateTime

/**
 * 文件删除失败记录
 */
data class FileDeleteFailureRecord(
    val id: Long? = null,
    val fileId: String,
    val failureReason: String? = null,
    val retryCount: Int = 0,
    val maxRetryCount: Int = 5,
    val status: FileDeleteStatus = FileDeleteStatus.PENDING,
    val sourceType: FileDeleteSourceType,
    val sourceId: String? = null,
    val createdTime: LocalDateTime? = null,
    val updatedTime: LocalDateTime? = null,
    val lastRetryTime: LocalDateTime? = null
)

/**
 * 文件删除状态
 */
enum class FileDeleteStatus {
    PENDING,    // 待处理
    RETRYING,   // 重试中
    FAILED,     // 永久失败
    DELETED     // 已删除
}

/**
 * 文件删除来源类型
 */
enum class FileDeleteSourceType {
    EXERCISE_RECORD,  // 练习记录
    EXAM_PAPER       // 试卷
}